<script type="text/javascript" src="<?=base_url()?>resource/js/layer/layer.js"></script>
<script type="text/javascript" src="<?=base_url()?>resource/plugins/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
    $(function(){
        var data='<?=$data?>';
        if(data==1){
            layer.msg('当前条件没有数据可以导出',{icon:5});
        }
        $("select[data-edit-select]").filterSelect();
    });
    function exportMerchantData(){
        var startTime=$('#startTimeM').val();
        var endTime=$('#endTimeM').val();
        if(startTime !='' && endTime ==''){
            alert('结束时间不能为空');
            return false;
        }
        if(endTime !='' && startTime==''){
            alert('开始时间不能为空');
            return false;
        }
    }
</script>

<script type="text/javascript">
    $(function(){
        $("select[data-edit-select]").filterSelect();
    });
    function submitF(){
        var filename=$('#filename').val();
        var title= $.trim($('#title').val());
        if(filename==''){
            alert('请选择文件');
            return false;
        }
        if(title==''){
            alert('请输入标题');
            return false;
        }
    }
</script>
<!--菜单 start-->
<?php $this->load->view('defaults/common/left');?>
<!--菜单 end-->
<div id="content">
    <div class="page-header">
        <div class="container-fluid">
          <h1><?=lang('menu_maintain_report')?></h1>
          <?=$this->breadcrumb->generateHTML();?>
        </div>
    </div>
    <div class="container-fluid">
        <div class="panel panel-default">
          <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-download"></i><?=lang('menu_export_data')?></h3>
          </div>
          <div class="panel-body">
            <div class="table-responsive">
                <h3 class="panel-title" style="margin-bottom: 10px;">维修费用数据</h3>
                <form action="<?=blang_url('maintainReport/exportData/ExportMaintainPriceData')?>" method="post" >
                    <table class="table table-bordered table-hover oms-table">
                      <thead>
                        <tr>
                            <th class="text-left">站点</th>
                            <th class="text-left"><?=lang('order_kssj')?></th>
                            <th class="text-left"><?=lang('order_jssj')?></th>
                            <th class="text-right">电商</th>
                            <th class="text-right">品牌商</th>
                            <th class="text-right">产品状态</th>
                            <th class="text-right"><?=lang('order_cz')?></th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                            <td class="text-left">
                                <select class="form-control" id="point" name="point">
                                    <option value="">-全部-</option>
                                    <?php foreach($pointList as $row){?>
                                        <option value="<?=$row['point']?>"><?=$row['name_ch']?></option>
                                    <?php }?>
                                </select>
                            </td>
                            <td class="text-left">
                                <input type="text" id="startTime" name="startTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-left">
                                <input type="text" id="endTime" name="endTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="platformMerchant" data-edit-select="1">
                                    <option value="">-全部-</option>
                                    <?php foreach($platformClineList as $row){?>
                                        <option value="<?=$row['id']?>"><?=$row['name']?></option>
                                    <?php }?>
                                </select>
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="brandMerchant" data-edit-select="1">
                                    <option value="">-全部-</option>
                                    <?php foreach($brandClineList as $row){?>
                                        <option value="<?=$row['id']?>"><?=$row['name']?></option>
                                    <?php }?>
                                </select>
                            </td>
                            <td class="text-right">
                                <select class="form-control" id="productStatus" name="productStatus">
                                    <option value="">-请选择-</option>
                                    <?php foreach($productStatus as $row){?>
                                        <option value="<?=$row['id']?>"><?=$row['name_ch']?></option>
                                    <?php }?>
                                </select>
                                <!-- <label style="color: #1872a2;">注意：不选产品状态默认为导出经历过“检测完成_待入库”、“待发货”和“待取件”的数据</label> -->
                            </td>
                             <td class="text-right">
                                <button class="btn btn-oms btn-sm" onclick="return exportPriceData()" type="submit"><i class="fa fa-download"></i>&nbsp;导出数据</button>
                            </td>
                        </tr>
                    </tbody>
                    </table>
                </form>
                <h3 class="panel-title" style="margin-bottom: 10px;">维修详情数据</h3>
                <form action="<?=blang_url('maintainReport/exportData/ExportMerchantOrderData')?>" method="post" >
                    <table class="table table-bordered table-hover oms-table">
                      <thead>
                        <tr>
                            <th class="text-left">站点</th>
                            <th class="text-left"><?=lang('order_kssj')?></th>
                            <th class="text-left"><?=lang('order_jssj')?></th>
                            <th class="text-right">电商</th>
                            <th class="text-right">品牌商</th>
                            <th class="text-right"><?=lang('order_cz')?></th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                            <td class="text-left">
                                <select class="form-control" id="point" name="point">
                                    <option value="">-全部-</option>
                                    <?php foreach($pointList as $row){?>
                                        <option value="<?=$row['point']?>"><?=$row['name_ch']?></option>
                                    <?php }?>
                                </select>
                            </td>
                            <td class="text-left">
                                <input type="text" id="startTimeM" name="startTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-left">
                                <input type="text" id="endTimeM" name="endTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="platformMerchant" data-edit-select="1">
                                    <option value="">-全部-</option>
                                    <?php foreach($platformClineList as $row){?>
                                        <option value="<?=$row['id']?>"><?=$row['name']?></option>
                                    <?php }?>
                                </select>
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="brandMerchant" data-edit-select="1">
                                    <option value="">-全部-</option>
                                    <?php foreach($brandClineList as $row){?>
                                        <option value="<?=$row['id']?>"><?=$row['name']?></option>
                                    <?php }?>
                                </select>
                            </td>
                             <td class="text-right">
                                <button class="btn btn-oms btn-sm" onclick="return exportMerchantData()" type="submit"><i class="fa fa-download"></i>&nbsp;导出数据</button>
                            </td>
                        </tr>
                    </tbody>
                    </table>
                </form>
                <h3 class="panel-title" style="margin-bottom: 10px;">hold订单</h3>
                <form action="<?=blang_url('maintainReport/exportData/exportHoldOrder')?>" method="post">
                    <table class="table table-bordered table-hover oms-table">
                      <thead>
                        <tr>
                            <th class="text-left"><?=lang('order_kssj')?></th>
                            <th class="text-left"><?=lang('order_jssj')?></th>
                            <th class="text-right">电商</th>
                            <th class="text-right"><?=lang('order_cz')?></th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                            <td class="text-left">
                                <input type="text" name="startTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-left">
                                <input type="text" name="endTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="merchant_num" data-edit-select="1">
                                    <option value="">-全部-</option>
                                    <?php foreach($platformClineList as $row){?>
                                        <option value="<?=$row['id']?>"><?=$row['name']?></option>
                                    <?php }?>
                                </select>
                            </td>
                             <td class="text-right">
                                <button class="btn btn-oms btn-sm" type="submit"><i class="fa fa-download"></i>&nbsp;导出数据</button>
                            </td>
                        </tr>
                    </tbody>
                    </table>
                </form>
                <h3 class="panel-title" style="margin-bottom: 10px;">维修师KPI数据</h3>
                <form action="<?=blang_url('maintainReport/exportData/getRepairPeopleKPI')?>" method="post">
                    <table class="table table-bordered table-hover oms-table">
                      <thead>
                        <tr>
                            <th class="text-left"><?=lang('order_kssj')?></th>
                            <th class="text-left"><?=lang('order_jssj')?></th>
                            <th class="text-right">维修师</th>
                            <th class="text-right">订单类型</th>
                            <th class="text-right"><?=lang('order_cz')?></th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                            <td class="text-left">
                                <input type="text" name="startTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-left">
                                <input type="text" name="endTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="repairPeople" data-edit-select="1">
                                    <option value="">-全部-</option>
                                    <?php foreach($role[5] as $row){?>
                                        <option value="<?=$row['account']?>"><?=$row['name']?></option>
                                    <?php }?>
                                </select>
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="orderType">
                                    <option value="">正常单</option>
                                </select>
                            </td>
                             <td class="text-right">
                                <button class="btn btn-oms btn-sm" type="submit"><i class="fa fa-download"></i>&nbsp;导出数据</button>
                            </td>
                        </tr>
                    </tbody>
                    </table>
                </form>
                <h3 class="panel-title" style="margin-bottom: 10px;">出库质检KPI数据</h3>
                <form action="<?=blang_url('maintainReport/exportData/getKpi')?>" method="post">
                    <table class="table table-bordered table-hover oms-table">
                      <thead>
                        <tr>
                            <th class="text-left"><?=lang('order_kssj')?></th>
                            <th class="text-left"><?=lang('order_jssj')?></th>
                            <th class="text-right">出库质检员</th>
                            <th class="text-right">订单类型</th>
                            <th class="text-right"><?=lang('order_cz')?></th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                            <td class="text-left">
                                <input type="text" name="startTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-left">
                                <input type="text" name="endTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="id" data-edit-select="1">
                                    <option value="">-全部-</option>
                                    <?php foreach($role[6] as $row){?>
                                        <option value="<?=$row['account']?>"><?=$row['name']?></option>
                                    <?php }?>
                                </select>
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="orderType">
                                    <option value="">正常单</option>
                                </select>
                            </td>
                             <td class="text-right">
                                <button class="btn btn-oms btn-sm" type="submit"><i class="fa fa-download"></i>&nbsp;导出数据</button>
                            </td>
                        </tr>
                    </tbody>
                    </table>
                </form>
                <h3 class="panel-title" style="margin-bottom: 10px;">拆包质检KPI数据</h3>
                <form action="<?=blang_url('maintainReport/exportData/getKpi')?>" method="post">
                    <table class="table table-bordered table-hover oms-table">
                      <thead>
                        <tr>
                            <th class="text-left"><?=lang('order_kssj')?></th>
                            <th class="text-left"><?=lang('order_jssj')?></th>
                            <th class="text-right">拆包质检员</th>
                            <th class="text-right">订单类型</th>
                            <th class="text-right"><?=lang('order_cz')?></th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                            <td class="text-left">
                                <input type="text" name="startTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-left">
                                <input type="text" name="endTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="id" data-edit-select="1">
                                    <option value="">-全部-</option>
                                    <?php foreach($role[4] as $row){?>
                                        <option value="<?=$row['account']?>"><?=$row['name']?></option>
                                    <?php }?>
                                </select>
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="orderType">
                                    <option value="">正常单</option>
                                </select>
                            </td>
                             <td class="text-right">
                                <button class="btn btn-oms btn-sm" type="submit"><i class="fa fa-download"></i>&nbsp;导出数据</button>
                            </td>
                        </tr>
                    </tbody>
                    </table>
                </form>
                <h3 class="panel-title" style="margin-bottom: 10px;">发货员KPI数据</h3>
                <form action="<?=blang_url('maintainReport/exportData/getKpi')?>" method="post">
                    <table class="table table-bordered table-hover oms-table">
                      <thead>
                        <tr>
                            <th class="text-left"><?=lang('order_kssj')?></th>
                            <th class="text-left"><?=lang('order_jssj')?></th>
                            <th class="text-right">发货员</th>
                            <th class="text-right">订单类型</th>
                            <th class="text-right"><?=lang('order_cz')?></th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                            <td class="text-left">
                                <input type="text" name="startTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-left">
                                <input type="text" name="endTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="id" data-edit-select="1">
                                    <option value="">-全部-</option>
                                    <?php foreach($role[9] as $row){?>
                                        <option value="<?=$row['account']?>"><?=$row['name']?></option>
                                    <?php }?>
                                </select>
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="orderType">
                                    <option value="">正常单</option>
                                </select>
                            </td>
                             <td class="text-right">
                                <button class="btn btn-oms btn-sm" type="submit"><i class="fa fa-download"></i>&nbsp;导出数据</button>
                            </td>
                        </tr>
                    </tbody>
                    </table>
                </form>
                <h3 class="panel-title" style="margin-bottom: 10px;">收货员KPI数据</h3>
                <form action="<?=blang_url('maintainReport/exportData/getKpi')?>" method="post">
                    <table class="table table-bordered table-hover oms-table">
                      <thead>
                        <tr>
                            <th class="text-left"><?=lang('order_kssj')?></th>
                            <th class="text-left"><?=lang('order_jssj')?></th>
                            <th class="text-right">收货员</th>
                            <th class="text-right">订单类型</th>
                            <th class="text-right"><?=lang('order_cz')?></th>
                        </tr>
                      </thead>
                      <tbody>
                        <tr>
                            <td class="text-left">
                                <input type="text" name="startTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-left">
                                <input type="text" name="endTime" value="" onfocus="WdatePicker({lang:'en'})" class="form-control Wdate">
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="id" data-edit-select="1" >
                                    <option value="">-全部-</option>
                                    <?php foreach($role[3] as $row){?>
                                        <option value="<?=$row['account']?>"><?=$row['name']?></option>
                                    <?php }?>
                                </select>
                            </td>
                            <td class="text-right">
                                <select class="form-control" name="orderType">
                                    <option value="">正常单</option>
                                </select>
                            </td>
                             <td class="text-right">
                                <button class="btn btn-oms btn-sm" type="submit"><i class="fa fa-download"></i>&nbsp;导出数据</button>
                            </td>
                        </tr>
                    </tbody>
                    </table>
                </form>
            </div>
          </div>
        </div>
    </div>

</div>






